package main

import (
	"fmt"
	"reflect"
)

/*
* Author: JacksonCoder
* CreateTime: 2025-10-27
 */

func main() {
	test()
}

func test() {

	a := 1                   // a value = 1
	b := &a                  //  b ->  (memory address)  a
	fmt.Println("*b = ", *b) // Dereference the address of a  get value to b
	fmt.Println("&a = ", &a) // this is memory address of a  equals var b = &a

	fmt.Printf("a type is  %T\n", a)
	fmt.Printf("b type is  %T\n", b)

	// reflect
	fmt.Println("a 的类型是: ", reflect.TypeOf(a))
	fmt.Println("b 的类型是: ", reflect.TypeOf(b))

	//

	fmt.Printf("a 的类型是： %T, 值：%v\n", a, a)
	fmt.Printf("b 的类型是： %T, 值：%v\n", b, b)
	fmt.Printf("*b 的类型是： %T, 值：%v\n", *b, *b)
	fmt.Printf("&a 的类型是： %T, 值：%v\n", &a, &a)
}
